/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.artezio.buyndrive.domain;

/**
 *
 * @author vgordievich
 */
public enum Role {
    ADMIN,
    CARSERVICE,
    USER;
    
    public static Role fromInteger(Integer role){
        for (Role c : Role.values()) {
            if (c.ordinal() == role) {
                return c;
            }
        }
        return null;
    }
}
